package com.triones.api.controller.api;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.R;
import com.triones.api.entity.RichContentDO;
import com.triones.api.service.RichContentService;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * api - 富文本内容
 *
 * @Author: triones
 */
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/api/richContent")
public class ApiRichContentController extends BaseController {

    private final RichContentService richContentService;

    /**
     * 详情
     */
    @GetMapping(value = "/{type}")
    public R<RichContentDO> apiGetNoticeInfoById(@PathVariable String type) {
        return R.ok(richContentService.selectById(type));
    }
}
